home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / VBASIC / NW41BAS.ZIP / NW4XMISC.BAS < prev    next >
Encoding:
BASIC Source File  |  1995-04-06  |  5.2 KB  |  121 lines

  1. 'NW4XMISC.BAS - Visual Basic Interface File for Netware 4.X SDK
  2. '   Contains Function defination and type declarations for the
  3. '   Miscalanious Functions of Netware
  4. 'Created by Joseph A. DiVito - Seton Hall University
  5. 'Requirments - NW4XCOMM.BAS
  6. 'Corresponds to NWMISC.H in the Netware SDK
  7. 'Includes some type decalration help from Novell's first release of NIVB
  8.  
  9. Global Const NW_SHORT_NAME_SERVER = 0
  10. Global Const NW_LONG_NAME_SERVER = 1
  11. Global Const NW_ENCP_SERVER = 1
  12. Global Const NW_EXTENDED_NCP_SERVER = 1
  13.  
  14. 'In the Acutal Include Files the Next 4 Const are actually precluded
  15. 'by an "_" character.  However this is not possible in VB
  16. Global Const NETX_COM = &H1
  17. Global Const NETX_VLM = &H2
  18. Global Const REDIR_LOADED = &H4000
  19. Global Const VLM_LOADED = &H8000
  20.  
  21. Type NW_DATE
  22.     day As String * 1
  23.     month As String * 1
  24.     year As Integer
  25. End Type
  26.  
  27. Type NW_TIME
  28.     seconds As String * 1
  29.     minutes As String * 1
  30.     hours As Integer
  31. End Type
  32.  
  33. 'Skipping Fragment structures for now.  This will also include
  34. 'any function using the TYPE NW_FRAGMENT
  35.  
  36. Type CONN_TASK
  37.     taskNumber As Integer
  38.     taskState As String * 1
  39. End Type
  40.  
  41. Type CONN_TASK_INFO
  42.     serverVersion As Integer
  43.     lockState As String * 1
  44.     waitingTaskNumber As Integer
  45.     recordStart As Long
  46.     recordEnd As Long
  47.     volNumber As String * 1
  48.     dirEntry As Long
  49.     nameSpace As String * 1
  50.     dirID As Integer
  51.     lockedName As String * 256
  52.     taskCount As String * 1
  53.     tasks(256) As CONN_TASK
  54. End Type
  55.  
  56. Type DIR_ENTRY
  57.     volNumber As String * 1
  58.     dirEntry As Long
  59. End Type
  60.  
  61. Declare Sub NWUnpackDateTime Lib "NWCALLS.DLL" (ByVal dateTime&, sDate As NW_DATE, sTime As NW_TIME)
  62. Declare Sub NWUnpackDate Lib "NWCALLS.DLL" (ByVal packeddate%, sDate As NW_DATE)
  63. Declare Sub NWUnpackTime Lib "NWCALLS.DLL" (ByVal packedtime%, sTime As NW_TIME)
  64. Declare Function NWPackDateTime Lib "NWCALLS.DLL" (sDate As NW_DATE, sTime As NW_TIME) As Long
  65. Declare Function NWPackDate Lib "NWCALLS.DLL" (sDate As NW_DATE) As Integer
  66. Declare Function NWPackTime Lib "NWCALLS.DLL" (sTime As NW_TIME) As Integer
  67.  
  68. 'The following 3 routines are in for compatibility only
  69. 'Avoid using them since they only call NWUnpack{Date/Time} anyway
  70. Declare Sub NWConvertDateTime Lib "NWCALLS.DLL" (ByVal dateTime&, sDate As NW_DATE, sTime As NW_TIME)
  71. Declare Sub NWConvertDate Lib "NWCALLS.DLL" (ByVal packeddate%, sDate As NW_DATE)
  72. Declare Sub NWConvertTime Lib "NWCALLS.DLL" (ByVal packedtime%, sTime As NW_TIME)
  73.  
  74. Declare Function NWWordSwap Lib "NWCALLS.DLL" (ByVal swapWord%) As Integer
  75. Declare Function NWLongSwap Lib "NWCALLS.DLL" (ByVal swapLong&) As Long
  76. Declare Function NWInitDBCS Lib "NWCALLS.DLL" () As Integer
  77. 'path should be initialized to String * 255
  78. 'dirHandle should be String * 1
  79. Declare Function NWConvertPathToDirEntry Lib "NWCALLS.DLL" (ByVal ConnID%, ByVal dirHandle$, ByVal path$, dirEntry As DIR_ENTRY) As Integer
  80. Declare Function NWGetTaskInformationByConn Lib "NWCALLS.DLL" (ByVal ConnID%, ByVal ConnNum%, taskInfo As CONN_TASK_INFO) As Integer
  81. 'majorVer, MinorVer and revision shoudl be Initialized to String * 1
  82. Declare Function NWGetRequestorVersion Lib "NWCALLS.DLL" (ByVal majorVer$, ByVal minorVer$, ByVal revision$) As Integer
  83. 'path should be initialized to String * 255
  84. 'dirHandle shoudl be String * 1
  85. Declare Function NWIsLNSSupportedOnVolume Lib "NWCALLS.DLL" (ByVal ConnID%, ByVal dirHandle%, ByVal path$) As Integer
  86. 'accessMode and NWHandle should be String * 1
  87. Declare Function NWConvertHandle Lib "NWCALLS.DLL" (ByVal ConnID%, ByVal accessMode$, ByVal NWHandle$, ByVal fileSize&, filehandle%) As Integer
  88. Declare Function NWConvertFileHandle Lib "NWCALLS.DLL" (ByVal filehandle%, ByVal handleType%, ByVal NWHandle$, conn%) As Integer
  89. 'NW4ByteHandle shoudl be String * 4 and NW6ByteHandle should be String * 6
  90. Declare Sub NWConvert4Byteto6ByteHandle Lib "NWCALLS.DLL" (ByVal NW4Bytehandle$, ByVal NW6ByteHandle$)
  91. Declare Function NWEndOfJob Lib "NWCALLS.DLL" () As Integer
  92. 'Not really needed in Windows, but suggested before making any NW calls
  93. 'However I don't even use it :) :)
  94. Declare Function NWCallsInit Lib "NWCALLS.DLL" (ByVal parm1%, ByVal parm%) As Integer
  95. Declare Function NWGetNWCallsState Lib "NWCALLS.DLL" () As Integer
  96. 'errormode and prevMode should be String * 1
  97. Declare Function NWSetNetwareErrorMode Lib "NWCALLS.DLL" (ByVal errorMode$, ByVal prevMode$) As Integer
  98. 'endofJobStatus and prevStatus should be String * 1
  99. Declare Function NWSetEndOfJobStatus Lib "NWCALLS.DLL" (ByVal endofJobStatus$, ByVal prevStatus$) As Integer
  100. 'all below parameter are String * 1
  101. Declare Sub NWGetNWCallsVersion Lib "NWCALLS.DLL" (ByVal majorVer$, ByVal minroVer$, ByVal revLevel$, ByVal betaLevel$)
  102. 'accessmode and NWHandle should be String * 1
  103. Declare Function NWConvertHandle Lib "NWCALLS.DLL" (ByVal ConnID%, ByVal accessMode$, ByVal NWHandle$, ByVal fileSize&, filehandle%) As Integer
  104. 'handleSize shouls always be equal to 4
  105. Declare Function NWCloseFile Lib "NWCALLS.DLL" (ByVal ConnID%, ByVal NWHandle&, ByVal handleSize%) As Integer
  106. 'path shoudl be String * 255 and server shoudl be String * 48
  107. Declare Function NWStripServerOffPath Lib "NWCALLS.DLL" (ByVal path$, ByVal server$) As String
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.